// 卡片样式
@mixin card-style {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    box-shadow: var(--card-shadow);
}

// 弹性布局
@mixin flex-center($direction: row) {
    display: flex;
    flex-direction: $direction;
    align-items: center;
    justify-content: center;
}

@mixin flex-between($align: center) {
    display: flex;
    align-items: $align;
    justify-content: space-between;
}

// 文字截断
@mixin text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

// 按钮样式
@mixin primary-button {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: var(--font-size-md);
    cursor: pointer;
    transition: background-color 0.3s;

    &:hover {
        opacity: 0.9;
    }

    &:active {
        opacity: 0.8;
    }
}